import java.util.Random;
import java.util.Scanner;

public class TestDemo {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int a = scanner.nextInt();
            System.out.println(a);
        }
    }

    // 最大公约数，辗转相除法
    public static int func2(int a, int b) {
        int c = a % b;
        while (c != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        return b;
    }

    public static void main21(String[] args) {
        System.out.println(func2(18, 24));
    }

    // 输出 1000 - 2000 之间所有的闰年
    public static void main20(String[] args) {
        for (int year = 1000; year <= 2000; year++) {
            if (year % 100 == 0) {
                if (year % 400 == 0) {
                    System.out.print(year + " ");
                }
            }else if (year % 4 == 0){
                System.out.print(year + " ");
            }
        }
    }

    // 打印 1 - 100 之间所有的素数
    public static void main19(String[] args) {
        for (int a = 1; a <= 100; a++) {
            int i = 2;
            for (; i < a; i++) {
                if (a % i == 0) {
                    break;
                }
            }
            if (i == a) {
                System.out.print(a + " ");
            }
        }
    }

    // 判定素数
    public static void main18(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int a = scanner.nextInt();
            int i = 2;
            for (; i < a; i++) {
                if (a % i == 0) {
                    System.out.println(a + "不是素数");
                    break;
                }
            }
            if (i == a) {
                System.out.println(a + "是素数");
            }
        }
    }

    // 年龄打印
    public static void main17(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int age = scanner.nextInt();
            if (age <= 18) {
                System.out.println("少年");
            }else if (age <= 28) {
                System.out.println("青年");
            }else if (age <= 55) {
                System.out.println("中年");
            }else {
                System.out.println("老年");
            }
        }
    }

    // 水仙花数
    public static void main16(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int a = 1; a < n; a++) {
            int i = 0;
            int b = a;
            while (b != 0) {
                b /= 10;
                i++;
            }
            if (i != 3) {
                continue;
            }

            int num = (int)Math.pow((a/100),3)
                    + (int)Math.pow((a/10)%10,3)
                    + (int)Math.pow((a%10),3);
            if (num == a) {
                System.out.println(a + "是水仙数");
            }
        }
    }

    // 求2个整数的最大公约数
    public static void main15(String[] args) {
        int a = 20;
        int b = 40;
        int max = a > b ? a : b;
        int min = a < b ? a : b;
        for (int i = max; i > 0; i--) {
            if (max % i == 0 && min % i == 0) {
                System.out.println("最大公约数:" + i);
                break;
            }
        }
    }

    // 二进制序列
    public static void main14(String[] args) {
        int a = 348; // 0001 0101 1100
        int numOdd = 0;
        int numEven = 0;
        for (int i = 1; i <= 32; i++) {
            if (((a>>i)&1) == 1) {
                if (i % 2 != 0) {
                    numOdd++;
                }else {
                    numEven++;
                }
            }
        }
        System.out.println("奇数：" + numOdd);
        System.out.println("偶数：" + numEven);
    }

    // 二进制1的个数。
    public static void main13(String[] args) {
        int a = 348; // 0001 0101 1100
        int num = 0;
        for (int i = 0; i < 32; i++) {
            if ((a&1) == 1) {
                num++;
            }
            a >>= 1;
        }
        System.out.println(num);
    }

    // 模拟登陆
    public static void main12(String[] args) {
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 3; i++) {
            System.out.print("请输入密码：");
            String str = scanner.nextLine();
            if (str.equals("12345")) {
                System.out.println("密码正确!");
                break;
            }else {
                System.out.print("密码错误,");
            }
        }
//        int i = 1;
//        while (scanner.hasNext()) {
//            System.out.print("请输入密码：");
//            String str = scanner.nextLine();
//            if (i < 3) {
//                if (str.equals("12345")) {
//                    System.out.println("密码正确!");
//                    break;
//                }else {
//                    System.out.print("密码错误，");
//                    i++;
//                }
//            }else {
//                break;
//            }
//        }

    }

    // 输出乘法口诀表
    public static void main11(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 1; i < n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + i*j + " ");
            }
            System.out.println();
        }
    }

    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int ranNum = random.nextInt(100)+1; // [0,100)->[1,101)
        while (true) {
            System.out.print("输入你要猜的数字：");
            int num = scanner.nextInt();
            if (num < ranNum) {
                System.out.println("猜小了");
            }else if (num == ranNum) {
                System.out.println("恭喜你！猜对了！");
                break;
            }else {
                System.out.println("猜大了");
            }
        }
    }

    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String name1 = scanner.next();
        System.out.println("姓名：" + name1);
        String name2 = scanner.nextLine();

        System.out.println("姓名：" + name2);
    }

    public static void main6(String[] args) {
        for ( ; ; ) {

        }
    }

    public static void main5(String[] args) {
        int i = 1;
        while (i <= 100) {
            if (i % 3 != 0 || i % 5 != 0) {
                i++;
                continue;
            }
            System.out.print(i + " ");
            i++;
        }
    }

    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int year = scanner.nextInt();
            if (year % 100 == 0) {
                if (year % 400 == 0) {
                    System.out.println(year + " is shiji LeapYear.");
                }else {
                    System.out.println(year + " is not shiji LeapYear.");
                }
            }else {
                if (year % 4 == 0) {
                    System.out.println(year + " is normal LeapYear.");
                }else {
                    System.out.println(year + " is not normal LeapYear.");
                }
            }
        }
    }

    public static void main3(String[] args) {
        System.out.println("1");
        System.out.println("4");
        System.out.println("5");
        System.out.println("2");
        System.out.println("3");
    }

    public static void main2(String[] args) {
//        int a = 10;
//        int b = 20;
//        System.out.println(a | b); // 16+8+4+2=30

//        int a = 0xf;
//        System.out.printf("%x\n", ~a); //

        int a = 0x1;
        int b = 0x2;
        System.out.printf("%x\n", a ^ b); //
    }

    public static void main1(String[] args) {
        int a = 10;
        a--; // 后置-- 表示给a的值加1，此时a的值为9
        System.out.println(a--); // 注意：后置--是先使用变量原来值，表示式结束时给变量-1，因此输出9
        System.out.println(a); // 输出8

        --a; // 前置++ 表示给a的值加1
        System.out.println(--a); // 注意：前置--是先给变量-1，然后使用变量中的值，因此输出6
        System.out.println(a); // 输出6
    }
}
